package com.carlinfo.stu_ques.demo.pojo;

import java.io.Serializable;
import java.util.Date;

import com.carlinfo.stu_ques.common.util.DateUtil;
/* 朝代的POJO
 * 属性:id ,名字,首都,年龄,开创时间,创建时间,修改时间
 * 方法:只有读写器,toString
 *  */
public class Dynasty implements Serializable
{
	private int id;
	private String name;
	private String capital;
	private short age;
	private Date st;
	private Date createTime;
	private Date updateTime;
	/* 读写器 */
	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getCapital()
	{
		return capital;
	}

	public void setCapital(String capital)
	{
		this.capital = capital;
	}

	public short getAge()
	{
		return age;
	}

	public void setAge(short age)
	{
		this.age = age;
	}

	public Date getSt()
	{
		return st;
	}

	public void setSt(Date st)
	{
		this.st = st;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	@Override
	public String toString()
	{
		/* 重写后的toString */
		DateUtil dateUtil = new DateUtil();
		String result = getId() + "\t" + getName() + "\t" + getCapital() + "\t" + getAge() + "\t"
				+ dateUtil.dateToStr(this.getSt()) + "\t" + dateUtil.dateTimeToStr(getCreateTime()) + "\t"
				+ dateUtil.dateTimeToStr(getUpdateTime());
		return result;
	}

}
